﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;

namespace ShoppingApp2.DAL.Helpers
{
    public static class StringsHelper
    {
        /// <summary>
        /// Extension method converting string into byte[]
        /// </summary>
        /// <param name="text"></param>
        /// <returns></returns>
        public static byte[] ConvertToByteArray(this string text)
        {
            Encoding enc = Encoding.ASCII;
            return enc.GetBytes(text);
        }
    }
}